package cn.tannn.ops.customer.controller.dto;


import cn.tannn.jdevelops.result.bean.SerializableBean;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.*;

/**
 * 功能节点管理-修改
 * @date  2021-06-08 09:50:02
 * @author tn
 * @version 1
 */
@Schema(description = "编辑菜单路由")
@ToString
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class MenuAlter extends SerializableBean<MenuAlter> {

    /** code */
    @Schema(description = "code", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String code;

    /**
     * 菜单名
     */
    @Schema(description = "菜单名")
    private String name;

    /**
     * 类型（0、节点；1、功能；2、按钮）
     */
    @Schema(description = "菜单类型（0、节点；1、功能；2、按钮）")
    @Min(0)
    @Max(2)
    private Integer type;

    /**
     * 节点路由
     */
    @Schema(description = "菜单路由")
    private String router;

    /**
     * 父菜单
     */
    @Schema(description = "父菜单")
    private String parentCode;


    /**
     * 父菜单
     */
    @Schema(description = "父菜单")
    private String parentName;

    /**
     * 排序，数字越小排在越前面
     */
    @Schema(description = "排序，数字越小排在越前面，默认0")
    private Integer sort;

    /**
     * 菜单图标
     */
    @Schema(description = "菜单图标")
    private String icon;

    /**
     * 节点状态
     */
    @Schema(description = "菜单状态（0、禁用；1、启用")
    @Min(0)
    @Max(2)
    private Integer status;

    /**
     * 菜单组件
     */
    @Schema(description = "菜单组件")
    private String component;

    /**
     * 菜单组件名
     */
    @Schema(description = "菜单组件名")
    private String componentName;

}
